Optimal. Leaf size=374 \[ \frac {(f x)^{1+m} \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) f n \left (a+b x^n+c x^{2 n}\right )}-\frac {c \left ((b d-2 a e) (1+m-n)-\frac {4 a c d (1+m-2 n)-b^2 d (1+m-n)+2 a b e n}{\sqrt {b^2-4 a c}}\right ) (f x)^{1+m} \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b-\sqrt {b^2-4 a c}\right ) f (1+m) n}-\frac {c \left ((b d-2 a e) (1+m-n)+\frac {4 a c d (1+m-2 n)-b^2 d (1+m-n)+2 a b e n}{\sqrt {b^2-4 a c}}\right ) (f x)^{1+m} \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b+\sqrt {b^2-4 a c}\right ) f (1+m) n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.88, antiderivative size = 374, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {1572, 1574,
371} \begin {gather*} -\frac {c (f x)^{m+1} \left ((m-n+1) (b d-2 a e)-\frac {2 a b e n+4 a c d (m-2 n+1)+b^2 (-d) (m-n+1)}{\sqrt {b^2-4 a c}}\right ) \, _2F_1\left (1,\frac {m+1}{n};\frac {m+n+1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a f (m+1) n \left (b^2-4 a c\right ) \left (b-\sqrt {b^2-4 a c}\right )}-\frac {c (f x)^{m+1} \left (\frac {2 a b e n+4 a c d (m-2 n+1)+b^2 (-d) (m-n+1)}{\sqrt {b^2-4 a c}}+(m-n+1) (b d-2 a e)\right ) \, _2F_1\left (1,\frac {m+1}{n};\frac {m+n+1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a f (m+1) n \left (b^2-4 a c\right ) \left (\sqrt {b^2-4 a c}+b\right )}+\frac {(f x)^{m+1} \left (c x^n (b d-2 a e)-a b e-2 a c d+b^2 d\right )}{a f n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 371
Rule 1572
Rule 1574
Rubi steps
\begin {align*} \int \frac {(f x)^m \left (d+e x^n\right )}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx &=\frac {(f x)^{1+m} \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) f n \left (a+b x^n+c x^{2 n}\right )}-\frac {\int \frac {(f x)^m \left (-a b e (1+m)-2 a c d (1+m-2 n)+b^2 d (1+m-n)+c (b d-2 a e) (1+m-n) x^n\right )}{a+b x^n+c x^{2 n}} \, dx}{a \left (b^2-4 a c\right ) n}\\ &=\frac {(f x)^{1+m} \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) f n \left (a+b x^n+c x^{2 n}\right )}-\frac {\int \left (\frac {\left (c (b d-2 a e) (1+m-n)+\frac {c \left (b^2 d-4 a c d+b^2 d m-4 a c d m-b^2 d n+8 a c d n-2 a b e n\right )}{\sqrt {b^2-4 a c}}\right ) (f x)^m}{b-\sqrt {b^2-4 a c}+2 c x^n}+\frac {\left (c (b d-2 a e) (1+m-n)-\frac {c \left (b^2 d-4 a c d+b^2 d m-4 a c d m-b^2 d n+8 a c d n-2 a b e n\right )}{\sqrt {b^2-4 a c}}\right ) (f x)^m}{b+\sqrt {b^2-4 a c}+2 c x^n}\right ) \, dx}{a \left (b^2-4 a c\right ) n}\\ &=\frac {(f x)^{1+m} \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) f n \left (a+b x^n+c x^{2 n}\right )}-\frac {\left (c \left ((b d-2 a e) (1+m-n)-\frac {4 a c d (1+m-2 n)-b^2 d (1+m-n)+2 a b e n}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {(f x)^m}{b-\sqrt {b^2-4 a c}+2 c x^n} \, dx}{a \left (b^2-4 a c\right ) n}-\frac {\left (c \left ((b d-2 a e) (1+m-n)+\frac {4 a c d (1+m-2 n)-b^2 d (1+m-n)+2 a b e n}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {(f x)^m}{b+\sqrt {b^2-4 a c}+2 c x^n} \, dx}{a \left (b^2-4 a c\right ) n}\\ &=\frac {(f x)^{1+m} \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) f n \left (a+b x^n+c x^{2 n}\right )}-\frac {c \left ((b d-2 a e) (1+m-n)-\frac {4 a c d (1+m-2 n)-b^2 d (1+m-n)+2 a b e n}{\sqrt {b^2-4 a c}}\right ) (f x)^{1+m} \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b-\sqrt {b^2-4 a c}\right ) f (1+m) n}-\frac {c \left ((b d-2 a e) (1+m-n)+\frac {4 a c d (1+m-2 n)-b^2 d (1+m-n)+2 a b e n}{\sqrt {b^2-4 a c}}\right ) (f x)^{1+m} \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b+\sqrt {b^2-4 a c}\right ) f (1+m) n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(5363\) vs. \(2(374)=748\).
time = 6.66, size = 5363, normalized size = 14.34 \begin {gather*} \text {Result too large to show} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\left (f x \right )^{m} \left (d +e \,x^{n}\right )}{\left (a +b \,x^{n}+c \,x^{2 n}\right )^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (f\,x\right )}^m\,\left (d+e\,x^n\right )}{{\left (a+b\,x^n+c\,x^{2\,n}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________